<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddStatusAndCampToRoleTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('role', function (Blueprint $table) {
            //
            $table->unsignedTinyInteger('status')
                  ->after('role_type')
                  ->comment('对局中是否使用，0 否 1 是');
            $table->unsignedTinyInteger('camp')
                  ->after('status')
                  ->comment('角色所属阵营，1 神职 2 平民 3 狼人');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('role', function (Blueprint $table) {
            //
            $table->dropColumn('status');
            $table->dropColumn('camp');
        });
    }
}
